<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>{$data.title} - {$Config.sitename}</title>
    <link rel="stylesheet" href="__CSS__/global.css" />
    <link rel="stylesheet" href="__CSS__/teach.css" />
    <Admintemplate file="Home/Public/global_js"/>
    <script src="__JS__/jquery.min.js"></script>
    <script>
    var SiteUrl = "__WEBURL__";
    </script>
</head>
<body>
<div class="b-page">
<include file="Public:header" />

<div class="b-zuopin">
<div class="b-banner yf-banner">
        <div class="b-banner__body l-center yf-banner__body">
            <div class="b-banner__main l-center">
                <foreach name="ad.center" item="cnt">
                    <a href="{$cnt.linkurl}" class="b-banner__item yf-banner__item" style="background-image: url(__FILESURL__{$cnt.image})"></a>
                </foreach>
                <div class="b-banner__nav">
                    <!-- <div class="b-banner__navItem act"></div> -->
                </div>
            </div>
        </div>
    </div>
<div class="b-zuopin__body">
    
    <div class="b-teachaddr yf-detail__addr">
        <a href="javascript:;" class="yf-teach-addr yf-teach-addrnow">当前位置:</a>
        <a href="__WEBURL__/index" class="yf-teach-addr">首页</a>
        <span>&gt;</span>
        <a href="__WEBURL__/teach/tlist/u/{$teachinfo.openuid}" class="yf-teach-addr">{$teachinfo.nickname}专栏</a>
        <span>&gt;</span>
        <a class="yf-teach-addr yf-teach-naddr">{$data.title}</a>
        
        <div class="yf-search">
            <div class="yf-search__list">
                <a href="javascript:;" class="yf-search__showItem" id="yf-search_type" data="1">话题</a>
                <ul class="yf_search__itemList">
                    <li class="yf_search__item current" data-type="1">话题</li>
                    <li class="yf_search__item" data-type="2" style="display:none;">用户</li>
                </ul>
            </div>
            <div class="yf-search__input">
                <input type="text" value="" id="yf-keywords">
                <div class="yf-search__placeholder">搜索话题</div>
            </div>
            <button class="yf-search__btn" data-openuid="{$teachinfo.openuid}">搜索</button>
        </div>
    </div>
    <div class="yf-teach__left">
        <div class="yf-detail__title">
            <if condition="$data.iflight eq 1">
            <span class="yf-detail__icon">精</span>
            </if>
            <p class="yf-detail__dtitle">
                {$data.title}
                <if condition="$is_coll eq 0">
                <a class="yf-detail__coll" data-id="{$data.teachid}" data-uid="{$data.userid}" data-type="addfav"><i></i>收藏该话题</a>
                <else/>
                <a class="yf-detail__coll" data-id="{$data.teachid}" data-uid="{$data.userid}" data-type="cancelfav"><i></i>已收藏该话题</a>
                </if>
                <if condition="$is_user eq 1">
                <div class="yf-detail__dy">
                    <a href="__WEBURL__/teach/editteach/id/{$data.teachid}" class="yf-detail__dybtn yf-detail__edit">编辑</a>
                    <a class="yf-detail__dybtn yf-detail__del yf-btn__del" data-id="{$data.teachid}" data-uid="{$data.userid}" data-openuid="{$teachinfo.openuid}">删除</a>
                </div>
                </if>
            </p>
        </div>
        <div class="yf-detail__body">
            <div class="yf-detail__one">
                <a href="__WEBURL__/u/{$teachuser.openuid}">
                    <img src="__WEBURL__/{$teachuser.uavatar}" width="100%">
                </a>
            </div>
            <div class="yf-detail__two">
                <div class="yf-detail__mem">
                    <a href="__WEBURL__/u/{$teachuser.openuid}" class="yf-detail__member">{$teachuser.nickname}<if condition="$teachuser.ifds eq 1"><span>导师</span></if></a>
                    <span class="yf-detail_date">发表于：{$data.create_time|date="Y-m-d H:i:s", ###}</span>
                </div>
                <div class="yf-detail__content">
                    {$data.content}
                </div>
                <div class="yf-detail__share">
                    <div class="bdsharebuttonbox yf-share__btn">
                        <a href="#" rel="nofollow" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
                        <a href="#" rel="nofollow" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
                        <a href="#" rel="nofollow" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
                        <a href="#" rel="nofollow" class="bds_duitang" data-cmd="duitang" title="分享到堆糖"></a>
                        <a href="#" rel="nofollow" class="bds_huaban" data-cmd="huaban" title="分享到花瓣"></a>
                        <a href="#" rel="nofollow" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
                    </div>
                    <div class="yf-share__title">分享到：</div>
                    <div class="yf-share__img" style="display:none;">{$data.image}</div>
                    <script>
                        var ifimg = {$data.ifimg};
                        if(ifimg == 1)
                        {
                            var temp = $('.yf-share__img').find("img").attr("src");
                            var img = '__FILESURL__' + temp;
                        }
                        else
                        {
                            var img = "";
                        }
                       // alert(img);
                        window._bd_share_main = undefined;
                        window._bd_share_config = {
                            common : {
                                bdText : '{$data.title}',
                                bdDesc : '{$data.content|str_cut=50}',
                                bdUrl : '__WEBURL__/teach/{$data.teachid}',
                                bdPic : img
                            },
                            share : {
                                "bdSize" : 24
                            }
                        }
                        with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
                    </script>
                </div>
            </div>
        </div>
        
        <a name="msg"></a>
        <div class="b-zuopinFayan">
            <a href="__WEBURL__/u/{$userinfo.openuid}" class="b-zuopinFayan__pic">
                    <img class="l-full" src="{$userinfo.uavatar|getUavatar}" alt="">
                <i class="b-popOtherZuopin__itemMask"></i>
            </a>
            <form onSubmit="return false">
                <textarea name="content" id="content" cols="30" title="评论至少2个字! " required data-len="2" rows="10" class="b-zuopinFayan__textarea"></textarea>
                <input type="hidden" id="infoid" value="{$data.teachid}"/>
                <input type="hidden" id="msgType" value="7"/>
                <button class="b-zuopinFayan__btn" id="sendMsg_btn">评论</button>
            </form>
        </div>
        
        <div class="b-huiying">
            <div class="b-huiying__title">{$msgcount} 回应</div>
            <div class="b-huiying__list">
                <include file="Public:msglist" />
            </div>
        </div>
     
    </div>
    <div class="yf-teach__right">
        <if condition="$ad.rightup neq ''">
        <a href="{$ad.rightup.linkurl}" class="yf-teach__rightad">
            <img src="__WEBURL__{$ad.rightup.image}" width="100%">
        </a>
        </if>
        <div class="yf-detail__people">
            <a class="yf-people__one">
                <img src="__WEBURL__/{$teachuser.uavatar}" width="100%">
            </a>
            <div class="yf-people__two">
                <div class="yf-people__href">
                    <a href="__WEBURL__/u/{$teachuser.openuid}" class="yf-people__center">{$teachuser.nickname}烘焙圈</a>
                    <if condition="$is_fans eq 1">
                    <a href="javascript:;" class="yf-people__fans R_ajax_trip" data-info="userid,{$teachuser.userid}" data-url="do/cancelfans/">+&nbsp;已关注</a>
                    <else/>
                    <a href="javascript:;" class="yf-people__fans R_ajax_trip" data-info="userid,{$teachuser.userid}" data-url="do/addfans/">+&nbsp;关注</a>
                    </if>
                </div>
                <p>{$teachuser.usign}</p>
            </div>
        </div>
        <div class="yf-teach__hot">
            <div class="yf-teach__hottile">
                作者其他热门文章
            </div>
            <div class="yf-hot__list">
            <foreach name="otherlist" item="os">
                <div class="yf-hot__mlist yf-detail__mlist">
                    <a href="__WEBURL__/teach/{$os.teachid}" class="yf-hot__href yf-detail__hot">{$os.title}</a>
                </div>
            </foreach>
            <empty name="otherlist">
                <div class="yf-hot__mlist yf-detail__mlist" style="display:none;">
                    <p>暂时没有热门话题</p>
                </div>
            </empty>
            </div>
        </div>
        
        <if condition="$ad.rightcenter neq ''">
        <a href="{$ad.rightcenter.linkurl}" class="yf-teach__centerad">
            <img src="__WEBURL__{$ad.rightcenter.image}" width="100%">
        </a>
        </if>
        
        <div class="yf-teach__light">
            <div class="yf-light__title">
                相关作品
            </div>
            <div class="yf-light__list">
            <foreach name="works" item="ws">
                <a href="__WEBURL__/works/{$ws.workid}" class="yf-light__mlist">
                    <div class="yf-light__img" style="background-image: url(__WEBURL__{$ws.image});">
                    </div> 
                    <div class="yf-light__info">
                        <p class="yf-light__ititle">{$ws.title}</p>
                        <p class="yf-light__content">{$ws.content}</p>     
                    </div>
                </a>
            </foreach>
            </div>
        </div>
        
        <if condition="$ad.rightdown neq ''">
        <a href="{$ad.rightcenter.linkurl}" class="yf-teach__centerad">
            <img src="__WEBURL__{$ad.rightdown.image}" width="100%" style="margin: 30px 0px;">
        </a>
        </if>
    </div>
</div>
</div>

<include file="Public:footer" />
</div>
<script src="__JS__/index.js"></script>
<script src="__JS__/jquery.common.js?v=20150101"></script>
<script src="__JS__/jquery.doajax.js"></script>
<script src="__JS__/teach.js"></script>
<script src="__JS__/jquery.marquee.js"></script>
<script>
    $(document).ready(function(){

    });
</script>
</body>
</html>